<?php
	session_start();
	
	require_once("php/utilities.inc");

	accesControl();

	$title = "Mis Albumes";
	$page = "Albumes";
	
	require_once("inc/header.inc");
	require_once("inc/navigation.inc");
?>
		<div class="content">
			<div class="listaResult">
				<?php
					echo '<ul>';
					$idUser = mysql_fetch_assoc(mysqlQuery("SELECT IdUsuario FROM usuarios WHERE NomUsuario = '{$_SESSION['user']}'"));
					$albumes = mysqlQuery("SELECT * FROM albumes WHERE Usuario = '{$idUser['IdUsuario']}'");
					while($row = mysql_fetch_assoc($albumes)){
						echo '<li><a href="verAlbum.php?id=' . $row['IdAlbum'] . '">' . $row['Titulo'] . '</a></li>';
					}
					echo '</ul>';
				?>
			</div>
		</div>
<?php
	require("inc/footer.inc");
?>